<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>

<div class="easyui-layout" fit="true">
	<div region="center" style="padding:0px;border:0px" >
		<t:datagrid name="deviceTypeList" checkbox="true" fitColumns="true" title="门禁授权" actionUrl="userDoorAccessController.do?datagrid" idField="id" fit="true" queryMode="group">
		 	<t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single" width="120"></t:dgCol>
		  	<t:dgCol title="门禁名称"  field="doorAccess.name"  queryMode="single"  width="120" ></t:dgCol> 
		  	<t:dgCol title="ip地址"  field="doorAccess.ip"    queryMode="single"  width="120"  align="center"></t:dgCol>
		  	<t:dgCol title="通道"  field="doorAccess.channel"    queryMode="single"  width="120"  align="center"></t:dgCol>
		  	<t:dgCol title="实验室"  field="doorAccess.lab.name"  queryMode="single" query="true" replace="${labNames }" width="120" ></t:dgCol> 
		  	<t:dgCol title="用户"  field="user.realName"  queryMode="single" query="true" width="120"></t:dgCol> 
		  	<t:dgCol title="工号"  field="user.staffNo"  queryMode="single" query="true" width="120"></t:dgCol> 
		  	<t:dgCol title="角色名"  field="user.userType"  formatterjs="function(v,rec){return v==1?'学生':'老师'}" replace="学生_1,老师_2" queryMode="single" query="true" width="120" ></t:dgCol> 
		  	<t:dgCol title="授权类型"  field="accessRight.name" queryMode="single" query="false" width="120" ></t:dgCol> 
		  	<t:dgCol title="开始时间"  field="startDate" formatter="yyyy-MM-dd hh:mm" queryMode="single" query="false" width="120" ></t:dgCol> 
		  	<t:dgCol title="结束时间"  field="endDate" formatter="yyyy-MM-dd hh:mm" queryMode="single" query="false" width="120" ></t:dgCol> 
		  	<t:dgCol title="操作" field="opt" width="160" ></t:dgCol>
		  	<t:dgDelOpt title="删除" url="userDoorAccessController.do?doDel&id={id}" />
		  	<t:dgFunOpt title="启用" funname="on"></t:dgFunOpt>
		  	<t:dgFunOpt title="停用" funname="off"></t:dgFunOpt>
		  	<t:dgToolBar title="批量授权" url="userDoorAccessController.do?goAdd" icon="icon-add" funname="add" height="400" width="600"></t:dgToolBar>
		  	<t:dgToolBar title="编辑" url="userDoorAccessController.do?goUpdate" icon="icon-edit" funname="update" height="280" width="450"></t:dgToolBar>  
		 	<t:dgToolBar title="查看" icon="icon-search" url="userDoorAccessController.do?goUpdate" funname="detail" height="280" width="450"></t:dgToolBar>
		 	<t:dgToolBar title="批量删除"  icon="icon-remove" url="userDoorAccessController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
		 	<t:dgToolBar title="批量启动"  icon="icon-edit" url="" funname="batchOn"></t:dgToolBar>
		 	<t:dgToolBar title="批量停用"  icon="icon-edit" url="" funname="batchOff"></t:dgToolBar>
		</t:datagrid>
	</div>
</div>
 